<%@ page language="java" import="java.util.*" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store"); 
response.setDateHeader("Expires", 0);
response.setHeader("Pragma","no-cache"); 
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Personal Page</title>
<link href="/InfoPlatform/MainPage/homepage_files/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="/InfoPlatform/MainPage/homepage_files/css/bootstrap-responsive.css" rel="stylesheet" type="text/css">
<link href="/InfoPlatform/MainPage/homepage_files/css/wj_style.css" rel="stylesheet" type="text/css">
<link href="/InfoPlatform/MainPage/homepage_files/css/datepicker.css" rel="stylesheet" type="text/css">
<link href="/InfoPlatform/MainPage/homepage_files/css/timepicker.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/InfoPlatform/MainPage/homepage_files/js/jquery.js"></script>
<style type="text/css">
.sidebar-nav {
	padding: 9px 0;
}
</style>
<script type='text/javascript'>
$(function(){
	$('#tab2').hide();
	$('.tab1').click(function(){
			$('.tab2').removeClass('active');
			$(this).addClass('active');
			$('#tab2').hide();
			$('#tab1').fadeIn();
	});
	$('.tab2').click(function(){
			$('.tab1').removeClass('active');
			$(this).addClass('active');						  
			$('#tab1').hide();
			$('#tab2').fadeIn();
	});});
</script>
</head>

<body>
<div class="navbar navbar-static-top">
  <div class="navbar-inner">
    <div class="container">
    <a class="brand" href="/InfoPlatform/Init.action">WSU online</a>
    <form class="navbar-form pull-left">
      <input type="text" class="search span3" placeholder="Search">
      <!--<button type="submit" class="btn">Search</button>-->
    </form>
    <a class="btn btn-info pull-left" href="#" style="margin-left:100px;"><i class="icon-download-alt icon-white"></i> APPDownload</a> 
    <!--</form>-->
    <form class="navbar-form pull-right">
      <div class="btn-group"> <a class="btn btn-primary" href="#"><i class="icon-user icon-white"></i><s:property value="#session.currentuser.name"/></a> <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
        <ul class="dropdown-menu">
          <li><a href="/InfoPlatform/Init.action"><i class="icon-home"></i>&nbsp;Homepage</a></li>
          <li><a href="#" onClick="fnReleaseItem('idReleaseSecondhand')"><i class="icon-shopping-cart"></i>&nbsp;Publish Secondary Goods</a></li>
          <li><a href="#" onClick="fnReleaseItem('idReleaseActive')"><i class="icon-flag"></i>&nbsp;Publish Activites</a></li>
          <li><a href="#" onClick="fnReleaseItem('idReleaseHelp')"><i class="icon-resize-small"></i>&nbsp;Ask for Help</a></li>
          <li class="divider"></li>
          <li><a href="#"><i class="i"></i>&nbsp;Log out</a></li>
        </ul>
      </div>
      </div>
    </form>
  </div>
  <!--/.nav-collapse --> 
</div>
</div>
</div>
<div class="container wj-roll">
  <div class="row-fluid">
    
    <div class="span9"><!--span9-->
      <div class="row-fluid well span12" style="background-image:url(/InfoPlatform/MainPage/homepage_files/img/001.png)">
        <div class="span3 wj-personal-pic-padding"><img class="wj-user-big-img-size" src="<s:property value='#session.currentuser.picture'/>"><!--<div style="width:180px;"><span class=" badge badge-info">  99个好友  </span><span class=" badge badge-success pull-right">  已发布  </span></div>--></div>
        <div class="span8 wj-personal-info-top">
          <div>
            <h3 class="wj-username-color"><s:property value="#session.currentuser.name"/></h3>
          </div>
          <p class="wj-usersummary-color">Introduction:<s:property value="#session.currentuser.college"/> <s:property value="#session.currentuser.major"/></p>
    <!--      <button class="btn btn-warning pull-right" id="addfriend" onClick="friendatatechange1()"><i class=" icon-ok-circle icon-white"></i> Add Friends</button>
          <button class="btn  pull-right btn-info" id="canclefriend" onClick="friendatatechange2()" style="display:none"><i class="icon-remove-circle icon-white"></i> Remove Friends</button> -->
        </div>
      </div>
      <!--./row-fluid well span12-->
      <!--item list-->
      <div class=" wj-full-width hide" style="display:block" id="idItemList">
        <ul class="nav nav-tabs">
    <li class="active tab1"><a href="#">My News</a></li>
  <li class="tab2"><a href="#">Friends' News</a></li>
</ul>

        <div class="wj-full-width">
          <ul class="pager">
            <li class="previous"><!--if you want to make it diable,use like "<li class="previous disabled">"--> 
              <a href="#">&larr; Past</a> </li>
            <li class="next disabled"> <a href="#">New &rarr;</a> </li>
          </ul>
        </div>
        <ul id="tab1" class="wj-zero-margin">  
		<!--我的活动显示板块-->
		<s:iterator id = "index" value = "#session.myactivitylist"  status="status">
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value='#session.currentuser.picture'/>"></a></div>
<div class="span10">
<s:if test="#index.studentId==#session.currentuser.studentId">
<p><h3 class="wj-font-normal-weight"><a href="#">Me:</a>published an activity<a href="Activity!SearchActivityById?activityId=<s:property value='activityId'/>"><s:property value="name"/></a></h3></p>
</s:if>
<s:else><p><h3 class="wj-font-normal-weight"><a href="#">Me:</a>interested in an activity<a href="Activity!SearchActivityById?activityId=<s:property value='activityId'/>"><s:property value="name"/></a></h3></p></s:else>

<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="publicTime"/></small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionNum"/>people interested in this</small>
<!--<small class="pull-right btn btn-mini">reply</small>-->
<!--<small class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</small>-->
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.activitycommentlist"  status="status">
<s:if test="#index1.activityId==#index.activityId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?activityId=<s:property value='activityId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
     </s:iterator>
	 
  <!--我的二手显示板块-->
		<s:iterator id = "index" value = "#session.mysecondarylist"  status="status">
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value='#session.currentuser.picture'/>"></a></div>
<div class="span10">
<s:if test="#index.studentId==#session.currentuser.studentId">
<p><h3 class="wj-font-normal-weight"><a href="#">Me:</a>Published a second hand good<a href="Secondary!SearchCommodityById?commodityId=<s:property value='commodityId'/>"><s:property value="name"/></a></h3></p>
</s:if>
<s:else><p><h3 class="wj-font-normal-weight"><a href="#">Me:</a>interested in a second hand good<a href="Secondary!SearchCommodityById?commodityId=<s:property value='commodityId'/>"><s:property value="name"/></a></h3></p></s:else>
<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="publicTime"/></small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionCount"/>people interested in this</small>
<!--<small class="pull-right btn btn-mini">reply</small>
<small class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</small>-->
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.secondarycommentlist"  status="status">
<s:if test="#index1.commodityId==#index.commodityId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?commodityId=<s:property value='commodityId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
     </s:iterator>
 <!--我的求助显示板块-->
		<s:iterator id = "index" value = "#session.myhelplist"  status="status">
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value='#session.currentuser.picture'/>"></a></div>
<div class="span10">
<s:if test="#index.studentId==#session.currentuser.studentId">
<p><h3 class="wj-font-normal-weight"><a href="#">Me:</a>ask for helping<a href="Help!SearchHelpById?helpId=<s:property value='helpId'/>"><s:property value="name"/></a></h3></p>
</s:if>
<s:else><p><h3 class="wj-font-normal-weight"><a href="#">Me:</a>intersted in  helping<a href="Help!SearchHelpById?helpId=<s:property value='helpId'/>"><s:property value="name"/></a></h3></p></s:else>
<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="deadline"/></small><!--<small class=" badge badge-info" style="margin-left:5px;">Already has 100 people interested in this</small>-->
<!--<small class="pull-right btn btn-mini">reply</small>
<small class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</small>-->
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.helpcommentlist"  status="status">
<s:if test="#index1.helpId==#index.helpId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?helpId=<s:property value='helpId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
     </s:iterator>
        </ul>
		<ul id="tab2" class="wj-zero-margin"> 
		<!--好友的活动显示板块-->
		<s:iterator id = "index0" value = "#session.friendslist"  status="status">
		<s:iterator id = "index" value = "#session.friendactivitylist"  status="status">
		<s:if test="#index0.studentId==#index.studentId">
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#index0.picture"/>"></a></div>
<div class="span10">
<p><h3 class="wj-font-normal-weight"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="#index0.name"/>：</a>published an activity<a href="Activity!SearchActivityById?activityId=<s:property value='activityId'/>"><s:property value="name"/></a></h3></p>
<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="publicTime"/></small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionNum"/>people interested in this</small>
<form action="UserManager!AddConcern?activityId=<s:property value='activityId'/>" method="post" class=" pull-right wj-zero-margin" style="display:inline" >

<button type="submit" class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</button>
</form>
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.friendactcomlist"  status="status">
<s:if test="#index1.activityId==#index.activityId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#index1.picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?activityId=<s:property value='activityId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
	</s:if>
     </s:iterator>
	 </s:iterator>
	 <!--好友关注的活动显示板块-->
		<s:iterator id = "index" value = "#session.friendactconlist"  status="status">
		
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span10">
<p><h3 class="wj-font-normal-weight"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/>：</a>interested in an activity<a href="Activity!SearchActivityById?activityId=<s:property value='activityId'/>"><s:property value="activityName"/></a></h3></p>
<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="concernTime"/></small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionNum"/>people interested in this</small>
<form action="UserManager!AddConcern?activityId=<s:property value='activityId'/>" method="post" class=" pull-right wj-zero-margin" style="display:inline" >
<button type="submit" class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</button>
</form>
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.friendactcomlist"  status="status">
<s:if test="#index1.activityId==#index.activityId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?activityId=<s:property value='activityId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
	
     </s:iterator>
	
	 <!--好友的帮助显示板块-->
	 <s:iterator id = "index0" value = "#session.friendslist"  status="status">
		<s:iterator id = "index" value = "#session.friendhelplist"  status="status">
		<s:if test="#index0.studentId==#index.studentId">
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#index0.picture"/>"></a></div>
<div class="span10">
<p><h3 class="wj-font-normal-weight"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="#index0.name"/>：</a>ask for helping<a href="Help!SearchHelpById?helpId=<s:property value='helpId'/>"><s:property value="name"/></a></h3></p>
<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="deadline"/></small><small class=" badge badge-info" style="margin-left:5px;">Already has 100 people interested in this</small>
<form action="UserManager!AddConcern?helpId=<s:property value='helpId'/>" method="post" class=" pull-right wj-zero-margin" style="display:inline" >
<button type="submit" class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</button>
</form>
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.friendhelpcomlist"  status="status">
<s:if test="#index1.helpId==#index.helpId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?helpId=<s:property value='helpId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
	</s:if>
     </s:iterator>
	 </s:iterator>
	 <!--好友关注的求助显示板块-->
		<s:iterator id = "index" value = "#session.friendhelpconlist"  status="status">
		
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span10">
<p><h3 class="wj-font-normal-weight"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/>：</a>intersted in  helping<a href="Help!SearchHelpById?helpId=<s:property value='helpId'/>"><s:property value="helpName"/></a></h3></p>
<p>Details<s:property value="detail"/></p>
<small class=" badge ">2011-1-1 12:00</small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionNum"/>people interested in this</small>
<form action="UserManager!AddConcern?helpId=<s:property value='helpId'/>" method="post" class=" pull-right wj-zero-margin" style="display:inline" >
<button type="submit" class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</button>
</form>
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.friendhelpcomlist"  status="status">
<s:if test="#index1.helpId==#index.helpId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?helpId=<s:property value='helpId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
	
     </s:iterator>
	 <!--好友的二手显示板块-->
	 <s:iterator id = "index0" value = "#session.friendslist"  status="status">
		<s:iterator id = "index" value = "#session.friendsecondarylist"  status="status">
		<s:if test="#index0.studentId==#index.studentId">
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#index0.picture"/>"></a></div>
<div class="span10">
<p><h3 class="wj-font-normal-weight"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="#index0.name"/>：</a>Published a second hand good<a href="Secondary!SearchCommodityById?commodityId=<s:property value='commodityId'/>"><s:property value="name"/></a></h3></p>
<p>Details<s:property value="detail"/></p>
<small class=" badge "><s:property value="publicTime"/></small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionCount"/>people interested in this</small>
<form action="UserManager!AddConcern?commodityId=<s:property value='commodityId'/>" method="post" class=" pull-right wj-zero-margin" style="display:inline" >
<button type="submit" class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</button>
</form>
</div>
</div>

<!--one comment-->
<div class="row-fluid wj-block">

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<s:iterator id = "index1" value = "#session.friendseccomlist"  status="status">
<s:if test="#index1.commodityId==#index.commodityId">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span11 ">

<p><a class="name" href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/></a>said:<s:property value="comment"/></p>
<small class=" badge "><s:property value="publishTime"/></small><small class="pull-right btn btn-mini addName">reply</small>

</div>
</div>
</s:if>
</s:iterator>
</div>
<!--./span10-->

</div>
<!--./one comment-->

<!--one ans mini-->
<div class="row-fluid wj-block ans" id="ans-2mini" >

<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<textarea class="wj-full-width" placeholder="comment..."></textarea>
</div>
<!--./span10-->
</div><!--./one ans mini-->

<!--one ans-->
<div class="row-fluid wj-block" style="display:none;" id="ans-2">
<div class="span2" style="height:1px;"></div>
<!--span10-->
<div class="span10">
<hr class="wj-line-margin wj-clear-float-left">
<div class="row-fluid">
<div class="span1 "><a href="#"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="#session.currentuser.picture"/>"></a></div>
<div class="span11 ">
<form action = "UserManager!AddComment.action?commodityId=<s:property value='commodityId'/>" method ="POST">
<textarea class=" wj-full-width wj-ans-size" name="comment"></textarea>
<button type="submit" class="btn btn-mini pull-right">Publish</button>
</form>
</div>
</div>
</div>
<!--./span10-->
</div>
<!--./one ans-->

          </li>
	</s:if>
     </s:iterator>
	 </s:iterator>
	 <!--好友关注的二手显示板块-->
		<s:iterator id = "index" value = "#session.friendsecconlist"  status="status">
		
         <li class="wj-full-width wj-clear-float-left wj-item-margin">
            <hr class="wj-line-margin wj-clear-float-left">
            <div class="row-fluid wj-block">
<div class="span2"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class=" wj-full-width wj-zero-margin pull-right" src="<s:property value="picture"/>"></a></div>
<div class="span10">
<p><h3 class="wj-font-normal-weight"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><s:property value="studentName"/>：</a>interested in a second hand good<a href="Secondary!SearchCommodityById?commodityId=<s:property value='secCommodiId'/>"><s:property value="secName"/></a></h3></p>
<p>Details<s:property value="detail"/></p>
<small class=" badge ">2011-1-1 12:00</small><small class=" badge badge-info" style="margin-left:5px;">Already has<s:property value="attentionNum"/>people interested in this</small>
<form action="UserManager!AddConcern?commodityId=<s:property value='secCommodiId'/>" method="post" class=" pull-right wj-zero-margin" style="display:inline" >
<button type="submit" class="pull-right btn btn-warning btn-mini" style="margin-right:3px;">interested</button>
</form>
</div>
</div>



          </li>
	
     </s:iterator>
        </ul>
      </div><!--./item list-->
      <!--release secondhand-->
  <div class=" wj-full-width" style="display:none" id="idReleaseSecondhand">
  <h3 class="wj-zero-margin-bottom">Publish new goods</h3>
  <hr class="wj-zero-margin-top">
   <form class="form-inline well" action = "Secondary!AddSecondary"  method ="POST" enctype ="multipart/form-data">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  Name&nbsp;&nbsp;<input type="text" class="input span7" name="name"><br><br>
  Photo&nbsp;&nbsp; <s:file name ="myPicture"/> 
  <!-- <span class="btn btn-success">
                    <i class="icon-plus icon-white"></i>
                    <span>Add files...</span>
                </span> --><br><br>
   Kind&nbsp;&nbsp;<select name = "secondaryTag">
            <option value="book">Books</option>
            <option value="sport">Sport</option>
            <option value="transport">Transport</option>
            <option value="digital">Digital</option>
            <option value="other">Others</option>
          </select>&nbsp;&nbsp;
          Price&nbsp;&nbsp;<input type="text" class="input span2" name="price">&nbsp;&nbsp;Dollars<br><br>
    Details&nbsp;&nbsp;<textarea class="span7 wj-item-info-size" name="detail"></textarea><br><br>
    <!-- 添加发布人id -->
    <input type="text" class="input span2 hide" name="studentId" value="<s:property value="#session.currentuser.studentId"/>" />
    
    Trading Place&nbsp;&nbsp;<input type="text" class="input span7" name="place"><br><br>
	 Deadline&nbsp;&nbsp;<input type="text" class="span2" value="12-12-2012" name="publicTime" data-date-format="mm/dd/yy" id="dp1"><br><br>
  Contact&nbsp;&nbsp;<span class="label label-important">*at least one</span>
  <hr class="wj-zero-margin-top">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone&nbsp;&nbsp;<input type="text" class="input span7"><br><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QQ&nbsp;&nbsp;&nbsp;<input type="text" class="input span7"><br><br>
  <div class="form-actions">
            <button type="submit" class="btn btn-primary pull-right">Publish</button>
            <button class="btn pull-right" type="reset" style="margin-right:6px;">Reset</button>
          </div>
  </form>
  </div>
  <!--./release resecond--> 
  
  <!--release active-->
  <div class=" wj-full-width" style="display:none" id="idReleaseActive">
  <h3 class="wj-zero-margin-bottom">Publish New Activities</h3>
  <hr class="wj-zero-margin-top">
  <form class="form-inline well" action = "Activity!AddActivity"  method ="POST" enctype ="multipart/form-data">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;<input type="text" class="input span7" name="name"><br><br>
  Photo&nbsp;&nbsp;<s:file name ="myPicture"/> <br><br>
   Kind&nbsp;&nbsp;<select name="activityTag">
            <option value="preach">Preach</option>
            <option value="academic">Academic</option>
            <option value="bulletin">Bulletin</option>
            <option value="lecture">Lecture</option>
            <option value="entertainment">Entertainment</option>
          </select><br><br>
    Activity Details&nbsp;&nbsp;<textarea class="span7 wj-item-info-size" name="detail"></textarea><br><br>
	 <!-- 添加发布人id -->
    <input type="text" class="input span2 hide" name="studentId" value="<s:property value="#session.currentuser.studentId"/>" />
    Activity Place&nbsp;&nbsp;<input type="text" class="input span4" name="place"><br><br>
	发布日期&nbsp;&nbsp;<input type="text" class="span2" value="12-12-2012" name="publicTime" data-date-format="mm/dd/yy" id="dp2"><br><br>
  Contact&nbsp;&nbsp;<span class="label label-important">*at least one</span>
  <hr class="wj-zero-margin-top">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone&nbsp;&nbsp;<input type="text" class="input span7"><br><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QQ&nbsp;&nbsp;&nbsp;<input type="text" class="input span7"><br><br>
  <div class="form-actions">
            <button type="submit" class="btn btn-primary pull-right">Publish</button>
            <button class="btn pull-right" type="reset" style="margin-right:6px;">Reset</button>
          </div>
  </form>
  </div>
  <!--./release active--> 
  
    <!--release help-->
  <div class=" wj-full-width" style="display:none" id="idReleaseHelp">
  <h3 class="wj-zero-margin-bottom">Asking for Help</h3>
  <hr class="wj-zero-margin-top">
  <form class="form-inline well" action = "Help!AddHelp"  method ="POST" enctype ="multipart/form-data">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;<input type="text" class="input span7" name="name"><br><br>
Photo&nbsp;&nbsp;<s:file name ="myPicture"/> <br><br>
   Kind of Helping&nbsp;&nbsp;<select name="helpTag">
            <option value="study">Study</option>
            <option value="sport">Activity</option>
            <option value="fun">Entertainment</option>
            <option value="food">Delicious Food</option>
          </select><br><br>
          <input type="text" class="input span2 hide" name="studentId" value="<s:property value="#session.currentuser.studentId"/>" />
    Details&nbsp;&nbsp;<textarea class="span7 wj-item-info-size" name="detail"></textarea><br><br>
    Deadline&nbsp;&nbsp;<input type="text" class="span2" value="12-12-2012" name="deadline" data-date-format="mm/dd/yy" id="dp4"><br><br>
  Contact&nbsp;&nbsp;<span class="label label-important">*at least one</span>
  <hr class="wj-zero-margin-top">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone&nbsp;&nbsp;<input type="text" class="input span7"><br><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QQ&nbsp;&nbsp;&nbsp;<input type="text" class="input span7"><br><br>
  <div class="form-actions">
            <button type="submit" class="btn btn-primary pull-right">Publish</button>
            <button class="btn pull-right" type="reset" style="margin-right:6px;">Reset</button>
          </div>
  </form>
  </div>
  <!--./release help--> 
    </div>
    <!--/span9-->
   <div class="span3">
      <div class="well sidebar-nav">
        <ul class="nav nav-list">
          <li class="nav-header">My Second Hand</li>
          <li><a href="Secondary!personalCommodity?secondaryTag=book&studentId=<s:property value='#session.currentuser.studentId'/>">Books</a></li>
          <li><a href="Secondary!personalCommodity?secondaryTag=sport&studentId=<s:property value='#session.currentuser.studentId'/>">Sport</a></li>
          <li><a href="Secondary!personalCommodity?secondaryTag=transport&studentId=<s:property value='#session.currentuser.studentId'/>">Transport</a></li>
          <li><a href="Secondary!personalCommodity?secondaryTag=digit&studentId=<s:property value='#session.currentuser.studentId'/>">Digital</a></li>
          <li><a href="Secondary!personalCommodity?secondaryTag=other&studentId=<s:property value='#session.currentuser.studentId'/>">Others</a></li>
          <li class="nav-header">My Activities</li>
          <li><a href="Activity!personalActivity?activityTag=preach&studentId=<s:property value='#session.currentuser.studentId'/>">Preach</a></li>
          <li><a href="Activity!personalActivity?activityTag=academic&studentId=<s:property value='#session.currentuser.studentId'/>">Academic</a></li>
          <li><a href="Activity!personalActivity?activityTag=bulletin&studentId=<s:property value='#session.currentuser.studentId'/>">Bulletin</a></li>
          <li><a href="Activity!personalActivity?activityTag=lecture&studentId=<s:property value='#session.currentuser.studentId'/>">Lecture</a></li>
          <li class="nav-header">My Asking for Help</li>
         <li><a href="Help!personalHelp?helpTag=study&studentId=<s:property value='#session.currentuser.studentId'/>">Ask for Studying</a></li>
          <li><a href="Help!personalHelp?helpTag=sport&studentId=<s:property value='#session.currentuser.studentId'/>">Ask for Sport</a></li>
          <li><a href="Help!personalHelp?helpTag=fun&studentId=<s:property value='#session.currentuser.studentId'/>">Ask for Entertainment</a></li>
          <li><a href="Help!personalHelp?helpTag=food&studentId=<s:property value='#session.currentuser.studentId'/>">Ask for Delicious Food</a></li>
        </ul>
      </div>
      <!--/.well --> 
    </div>
    <!--/span--> 
    <!--another span3-->
    <div class="span3">
    <div class="accordion" id="accordion2">
            <div class="accordion-group">
              <div class="accordion-heading">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
                  Friends List
                </a>
              </div>
              <div id="collapseOne" class="accordion-body collapse in">
                <div class="accordion-inner">
                <div>
                <ul class="wj-zero-padding wj-zero-margin" style="overflow:hidden;">
				<s:iterator id = "index" value = "#session.friendslist"  status="status">
		  		<li class="span4 " style="margin-left: 0px;margin-right: 4px;"><div class="wj-full-width"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class="wj-user-list-img-size" src="<s:property value='picture'/>"></a><div class="wj-full-width wj-text-center"><s:property value="name"/></div></div></li>
                </s:iterator>
                </ul>
                <div>
                <a  class="badge-info badge pull-right" data-toggle="modal" href="#morefriend" data-backdrop="false">more</a>
                &nbsp;
                </div>
                </div>
                </div>      
                
              </div>
            </div>
          </div>
    </div>
    <!--/.another span3-->
  </div>
  <!--/row-->

  <hr>
  <p class="wj-footer">Copyright <a href="#">WSU online</a> All Rights Reserved. Powered by <a href="#">WSU</a>.</p>
</div>
<!--/.fluid-container--> 
<!--more friend-->
<div class="modal hide fade" style="display: none;" id="morefriend">
  <div class="modal-header">
    <h3>My Friends</h3>
  </div>
  <div class="modal-body">
  <div class="wj-full-width">
<ul class="wj-zero-margin">
<s:iterator id = "index" value = "#session.friendslist"  status="status">
<li class="wj-float-left wj-friend-margin-left"><div class="wj-friend-width"><a href="FriendManager!ViewFriend.action?friendId=<s:property value='studentId'/>"><img class="wj-user-list-img-size" src="<s:property value='picture'/>"></a><div class="wj-full-width wj-text-center"><s:property value="name"/></div></div></li>
</s:iterator>
</ul></div>

  </div>
  <div class="modal-footer"> <a class="btn btn-primary" data-dismiss="modal">Close</a> </div>
</div>
<!--./more friend-->

<!-- Le javascript
    ================================================== --> 
<!-- Placed at the end of the document so the pages load faster --> 
<script language="javascript" src="/InfoPlatform/MainPage/homepage_files/js/jquery.js"></script> 
<script language="javascript" src="/InfoPlatform/MainPage/homepage_files/js/bootstrap.js"></script>
<script language="javascript" src="/InfoPlatform/MainPage/homepage_files/js/wj.js"></script>
<script language="javascript" src="/InfoPlatform/MainPage/homepage_files/js/bootstrap-datepicker.js"></script>
<script language="javascript" src="/InfoPlatform/MainPage/homepage_files/js/bootstrap-timepicker.js"></script>    
<script language="javascript" type="text/javascript">
function fnReleaseItem(strid)
{
	document.getElementById("idItemList").style.display="none";
	document.getElementById("idReleaseSecondhand").style.display="none";
	document.getElementById("idReleaseActive").style.display="none";
	document.getElementById("idReleaseHelp").style.display="none";
	document.getElementById(strid).style.display="block";}
$('#dp1').datepicker({
				format: 'mm-dd-yyyy'
			});
$('#dp2').datepicker({
				format: 'mm-dd-yyyy'
			});
$('#dp3').datepicker({
				format: 'mm-dd-yyyy'
			});
$('#dp4').datepicker({
				format: 'mm-dd-yyyy'
			});
$('#dp5').datepicker({
				format: 'mm-dd-yyyy'
			});
$('.timepicker-2').timepicker();
function friendatatechange1()
{
	document.getElementById('addfriend').style.display='none';
	document.getElementById('canclefriend').style.display='block';	
	}
function friendatatechange2()
{
	document.getElementById('addfriend').style.display='block';
	document.getElementById('canclefriend').style.display='none';	
	}
$(function(){
	$('div.ans').click(function(){
		$(this).next().show();
		$(this).hide();							
	});
});
$('.addName').click(function(){
name=$(this).parent().find('a.name').text();
$textarea=$(this).parents('li').find('textarea').html('reply'+name);
});
</script>
</body>
</html>
